﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <link href="${base}/front/detail/style/css/dashboard.css" rel="stylesheet" type="text/css">
</head>

<body style="text-align: center">
<a href="${front}/FindTable.jsp">返回餐桌</a>
<a href="${front}/detail/clientOrderList.jsp">订单</a>
<c:if test="${sessionScope.user == null}">
    <a href="${base}/user/login.jsp">登陆</a>
</c:if>
<c:if test="${sessionScope.user != null}">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    欢迎：
    ${sessionScope.user.userName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="${base}/user?method=userLogout">退出登陆</a>
</c:if>
<center>
    <div class="table-responsive">
        <table class="table table-striped">
                <tr height="40">
                    <td align="center" width="20%">订单号</td>
                    <td align="center" width="20%">餐桌名</td>
                    <td align="center" width="20%">价格</td>
                    <td align="center" width="20%">下单时间</td>
                    <td align="center" width="20%">支付状态</td>
                    <td align="center" width="20%">详情</td>
                </tr>

                <c:forEach items="${sessionScope.orderList_history}" var="history">
                    <tr height="60">
                        <td align="center" width="20%">${history.orderId}</td>
                        <td align="center" width="20%">￥${history.orderTableName}</td>
                        <td align="center" width="20%">${history.orderPrice/100}</td>
                        <td align="center" width="20%">${history.orderCreateTime}</td>

                        <td align="center" width="20%">
                            <c:if test="${history.orderPayStatus == 0}">
                                未支付
                            </c:if>
                            <c:if test="${history.orderPayStatus == 1}">
                                已支付
                            </c:if>
                        </td>
                        <td align="center">
                            <a href="${base}/order?method=findOrderDetail&detailOrderId=${history.orderId}" >详情</a>
                        </td>

                    </tr>
                </c:forEach>

            </table>
    </div>
</center>

</body>
</html>
